import React from 'react'
import styles from './css/Myitem.module.css'
import { useNavigate, useSearchParams } from 'react-router-dom'
const Myitem = (props) => {
    const [sp]=useSearchParams()
    
    const nav=useNavigate()
    return (
        <div className={styles.box} onClick={()=>nav(`/tickelist:id?&id=${props.id}&start=${props.startStation}&end=${props.endStation}&date=${sp.get('date')}`)}>
            <span>{props.startTime}</span>
            <span>{props.timeTaken}</span>
            <span>{props.endTime}</span>
            <span style={{ color: 'orange',fontSize:'18px' }}><b>￥{props.ssoftSeat.price}</b></span>

            <span>{props.startStation}</span>
            <span>{props.trainNo}</span>
            <span>{props.endStation}</span>
            <span>{'打折'}</span>

            <span>{'二等'}</span>
            <span>{'一等'}</span>
            <span>{'优选一等'}</span>
            <span>{'商务'}</span>

        </div>
    )
}

export default Myitem
